import request from '@/utils/requestPro';


/**
 * 商家查询库存信息
 * @param params
 */
export function businessQueryGoodsAndDepotApi(params) {
	return request({
		url: `/admin/appHome/goodsAndDepot/businessQueryGoodsAndDepot`,
		method: 'get',
		params,
	});
}

/**
 * 商家修改库存信息
 * 
 */
export function businessAppModifyGoodsAndDepotApi(data) {
	return request({
		url: `/admin/appHome/goodsAndDepot/businessAppModifyGoodsAndDepot`,
		method: 'put',
		data,
	});
}

/**
 * 根据商品id,查SKU--查询
 * @param pram
 */
export function businessAppQueryCommodityRegionalPriceSKUApi(params) {
  return request({
    url: '/admin/appHome/commodityRegionalPrice/businessAppQueryCommodityRegionalPriceSKU',
    method: 'get',
    params,
  });
}

/**
 * 仓库信息--查询
 * @param pram
 */
export function queryDepotInformationApi(params) {
  return request({
    url: '/admin/appHome/depot/queryDepotInformation',
    method: 'get',
    params,
  });
}

/**
 * 根据SKU--查询库存
 * @param pram
 */
export function businessQueryGoodsAndDepotInfoApi(params) {
  return request({
    url: '/admin/appHome/goodsAndDepot/businessQueryGoodsAndDepotInfo',
    method: 'get',
    params,
  });
}

/**
 * 商家设置商品为寄售
 * @param pram
 */
export function changeSaleTypeApi(data) {
  return request({
    url: `/admin/appHome/goodsAndDepot/business/update/sale/type`,
    method: 'put',
    data,
  });
}

/**
 * 商家设置商品为预售
 * @param pram
 */
export function changeSaleTypeTwoApi(data) {
  return request({
    url: `/admin/appHome/goodsAndDepot/business/update/sale/type/two`,
    method: 'put',
    data,
  });
}